package com.test.dazuoye.dao;


import com.test.dazuoye.domain.YongHu;
import com.test.dazuoye.domain.shangjia;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @date 2020/6/4-10:14
 */
@Mapper
@Repository
public interface ShangJiaDao {

    //查询用户
    @Select("select * from shangjia")
    public List<shangjia> findAll();


    //删除用户
    @Delete("delete from shangjia where cname=#{cname}")
    public void deleteShangJia(String cname);

    //保存用户
    @Insert("insert into shangjia(buwei,cname,money) values (#{buwei},#{cname},#{money})")
    public void saveShangJia(shangjia shangjia);
}
